import java.util.Stack;

public class _0314_两个栈实现队列 {

    Stack<Integer> inStack;
    Stack<Integer> outStack;


    public _0314_两个栈实现队列() {
        inStack = new Stack<>();
        outStack = new Stack<>();
    }

    public void appendTail(int value) {
        inStack.push(value);
    }

    public int deleteHead() {
        if (outStack.empty()) {
            while (!inStack.empty()) {
                outStack.push(inStack.pop());
            }
        }
        if(outStack.empty()){
            return -1;
        }
        return outStack.pop();
    }
    public static void main(String[] args) {
    }

}
